package com.datastructure.test.reversestring;

public class ReverseString {

    public static void main(String[] args) {

    }

    public String solve (String str) {
        // write code here
        if(str==null||str.length()==1){
            return str;
        }
        StringBuilder stringBuilder=new StringBuilder(str);
        return stringBuilder.reverse().toString();
    }
}
